//
//  ApplyAuthIDImageView.swift
//  Venus
//
//  Created by qurongxiang on 2018/8/4.
//  Copyright © 2018年 zhaowang. All rights reserved.
//

import UIKit

class ApplyAuthIDImageView: UIView {
    
    lazy var titleLabel = UILabel(UIColor.init(hex: "999999")!, 14, "剩余第1期应付租金(元)")
    lazy var imgView = UIImageView()
    
    fileprivate lazy var addImgView = UIImageView()
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        setupUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
}



extension ApplyAuthIDImageView {
    func setupUI() {
        fastCornerRadius(value: 4)
        addSubview(imgView)
        addSubview(addImgView)
        addSubview(titleLabel)
        
        self.backgroundColor = kColorC2
        titleLabel.isUserInteractionEnabled = false
        addImgView.isUserInteractionEnabled = false
        imgView.isUserInteractionEnabled = true
        
        imgView.snp.makeConstraints { (make) in
            make.edges.equalToSuperview()
        }
        imgView.backgroundColor = kColorC2
        
        
        addImgView.snp.makeConstraints { (make) in
            make.centerX.equalToSuperview()
            make.centerY.equalToSuperview().inset(-10)
            make.size.equalTo(CGSize(width: 30, height: 30))
        }
        addImgView.fastCornerRadius(value: 15)
        addImgView.image = UIImage(named: "applyAdd")
        
        titleLabel.snp.makeConstraints { (make) in
            make.centerX.equalToSuperview()
            make.centerY.equalToSuperview().inset(20)
        }
        
    }
}
